home *** CD-ROM | disk | FTP | other *** search
/ Champak 62 / Volume 62 - JOGO DISK .iso / Games / room-maker.swf / scripts / frame_6 / PlaceObject2_781_38 / CLIPACTIONRECORD onClipEvent(enterFrame).as next >
Text File  |  2008-03-17  |  597b  |  33 lines

  1. onClipEvent(enterFrame){
  2.    distX = targetX - this._x;
  3.    distY = targetY - this._y;
  4.    if(Math.abs(distX) > 0.01)
  5.    {
  6.       this._x += distX * rateX;
  7.    }
  8.    else
  9.    {
  10.       this._x = targetX;
  11.    }
  12.    if(Math.abs(distY) > 0.01)
  13.    {
  14.       this._y += distY * rateY;
  15.    }
  16.    else
  17.    {
  18.       this._y = targetY;
  19.    }
  20.    this.help_btn.onRelease = function()
  21.    {
  22.       targetX = 120;
  23.       targetY = 130;
  24.       _root.nonullmenu = false;
  25.    };
  26.    this.close_btn.onRelease = function()
  27.    {
  28.       targetX = iX;
  29.       targetY = iY;
  30.       _root.nonullmenu = true;
  31.    };
  32. }
  33.